#include <iostream>

template <class T>
class A {
public:
    virtual ~A() = default;
    void func() {
        std::cout << "A::func" << std::endl;
    }
};

void func() {
    std::cout << "func" << std::endl;
}

template <class T>
class B : public A<T>
{
public:
    void other_func() {
        func();
    }
};

int main() {
    B<int> b;
    b.other_func();
    return 0;
}